extends Node



#func _physics_process(_delta):
	#if not navigation_agent_2d.is_navigation_finished():
		#var next_position := navigation_agent_2d.get_next_path_position()
		#var direction = global_position.direction_to(next_position)
		#navigation_agent_2d.set_velocity(direction * spped)
		#global_rotation = direction.angle()
		#
	#var distance = global_position.distance_to(Global.player.global_position)
#
	#if distance < 700 && timer > 2 && is_valid:
		#timer = 0
		#Item.instanceToMain(Item.enemy_shell, $Marker2D.global_position, global_rotation, Vector2.from_angle(global_rotation).normalized())
#
#
#func _on_nav_timer_timeout():
	#navigation_agent_2d.target_position = Global.player.global_position
#
#
#func _on_navigation_agent_2d_velocity_computed(safe_velocity):
	#velocity = safe_velocity
	#move_and_slide()
